package cn.zhizihua.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 分页条件
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseQuery {

    private Integer pageNow = 1; //当前页页码
    private Integer pageCount = 5; //每页显示的记录数
    /*
    计算查询开始下标
     */
    public Integer getStartIndex(){
       return  (pageNow-1)*pageCount;
    }
}
